class PageUtils:
    def __init__(self, data, page=1, page_size=10):
        """
        初始化分页工具类
        :param data: 数据列表
        :param page: 当前页码，默认为 1
        :param page_size: 每页大小，默认为 10
        """
        self.data = data
        self.page = page
        self.page_size = page_size
        self.total_items = len(data)
        self.total_pages = (self.total_items + self.page_size - 1) // self.page_size

    def get_page_data(self):
        """
        获取当前页的数据
        :return: 当前页的数据列表
        """
        start = (self.page - 1) * self.page_size
        end = start + self.page_size
        return self.data[start:end]

    def get_pagination_info(self):
        """
        获取分页信息
        :return: 分页信息字典，包含总页数、当前页码、每页大小、总记录数
        """
        return {
            "total_pages": self.total_pages,
            "current_page": self.page,
            "page_size": self.page_size,
            "total_items": self.total_items
        }